public class While {
    public static void main(String[] args) {
        int sum = 0 ;
        int n =1;
        while(n<=100){
            sum = sum + n;
            n++;

        }
        System.out.println(sum);

        int sum2 = 0;
        int m2 = 20;
        int n2 = 100;
        while(m2<=n2){
            sum2 = sum2+m2;
            m2 ++;
        }
        System.out.println(sum2);
    }
}
